package info.androidhive.slidingmenu;

import java.util.ArrayList;
import java.util.HashMap;


import com.list.androidhive.ImageLoader;

import info.androidhive.slidingmenu.R;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class HomeFragmentAdapter extends BaseAdapter {
    
    private Activity activity;
    private ArrayList<HashMap<String, String>> data;
    private static LayoutInflater inflater=null;

    
    public ImageLoader imageLoader; 
    
    
    public HomeFragmentAdapter(Activity a, ArrayList<HashMap<String, String>> d) {
        activity = a;
        data=d;
        inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        imageLoader=new ImageLoader(activity.getApplicationContext());
    }

    public int getCount() {
        return data.size();
    }

    public Object getItem(int position) {
        return position;
    }

    public long getItemId(int position) {
        return position;
    }
    
    public View getView(int position, View convertView, ViewGroup parent) {
        View vi=convertView;

        HashMap<String, String> song = new HashMap<String, String>();
        song = data.get(position);
        
    	vi = inflater.inflate(R.layout.failure_row_3, null);

        return vi;
    }
}